#! /usr/bin/env python
#coding:utf-8
#说明：os.listdir模块遍历目录，但是不递归；
import os,sys

dir='/h3/update/download'

os.chdir(dir)
for f in os.listdir(dir):
#    f_status=f.split('.')[0]+'.status'
#    print f_status
    if os.path.isfile(f) and f.endswith('status') == False:
        f_status=os.path.join(dir,f.split('.')[0]+'.status')
        print "进程号: %s" %os.getpid()
        print f_status

#    print "file name is: %s" % f
